package cn.pku.ss.sirx.sna.ib.bean;

import java.util.Iterator;

import cn.pku.ss.sirx.sna.ib.MessageIterator;

/**
 * Abstract of a message board.
 *
 * @author SirX
 * @version 1.0
 */
public class MessageBoard implements Iterable<Message> {
    
    /**
     * Default constructor.
     */
    public MessageBoard() {}
    
    /**
     * Constructor.
     */
    public MessageBoard(String ownerId) {
        this.ownerId = ownerId;
    }
    
    public String getOwnerId() {
        return ownerId;
    }
    
    public void setOwnerId(String ownerId) {
        this.ownerId = ownerId;
    }
    
    @Override
    public Iterator<Message> iterator() {
        return new MessageIterator(this);
    }

    private String ownerId;

}
